package cn.flying.cloud.message.api.dubbo;

import javax.annotation.Resource;

import org.apache.dubbo.config.annotation.DubboService;

import cn.flying.cloud.message.api.MessageServiceApi;
import cn.flying.cloud.message.core.service.MessageService;
import cn.flying.cloud.message.model.MessageRequest;

/**
 * 消息推送服务接口
 *
 * @author: admin
 * @date: 2025年03月30日 23:17
 * @version: 1.0
 */
@DubboService
public class MessageApiService implements MessageServiceApi {

    @Resource
    private MessageService messageService;


    /**
     * @param request
     * @return
     */
    @Override
    public void sendSms(MessageRequest request) {
        messageService.sendSms(request);
    }

    /**
     * 简单文本邮件
     *
     * @param request
     */
    @Override
    public void sendSimpleMail(MessageRequest request) {
        messageService.sendSimpleMail(request);
    }

    /**
     * html邮件
     *
     * @param request
     */
    @Override
    public void sendHtmlMail(MessageRequest request) {
        messageService.sendHtmlMail(request);
    }
}
